import { defineStore } from 'pinia'
import tool from '@/utils/tool'
import router from '@/router'
import { useAppStore } from '@/store'

const useMapStore = defineStore('ma_map', {

  state: () => ({
    address: undefined,
    latlon:undefined

  }),

  actions: {

    setMap(data) {
      console.log(data)
      this.address = data.address
      this.latlon = data.point
    },
  
    clearMap() {
      this.$reset();
    }
  }
    
  })
export default useMapStore